package com.ttg.web.dao.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ttg.model.mapper.VipAccountCountInfoMapper;
import com.ttg.model.pojo.VipAccountCountInfo;
import com.ttg.web.dao.VipAccountCountInfoDao;
import org.springframework.stereotype.Service;

/**
 * @author zhangHongYuan
 * @description
 * @date 2024/2/24 17:59
 */
@Service
public class VipAccountCountInfoDaoImpl extends ServiceImpl<VipAccountCountInfoMapper, VipAccountCountInfo> implements VipAccountCountInfoDao {

    @Override
    public VipAccountCountInfo getByVipId(Long vipId) {
        LambdaQueryWrapper<VipAccountCountInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(VipAccountCountInfo::getVipId,vipId);
        return getOne(lambdaQueryWrapper);
    }

    @Override
    public VipAccountCountInfo getByCstId(Long cstId) {
        LambdaQueryWrapper<VipAccountCountInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(VipAccountCountInfo::getCstId,cstId);
        return getOne(lambdaQueryWrapper);
    }
}
